package com.youdoneed.community.group.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.youdoneed.community.group.entity.Forumgroupinvitationrecord;

@Mapper
public interface ForumgroupinvitationrecordMapper {
    int deleteByPrimaryKey(String groupInvitationRecordId);

    int insert(Forumgroupinvitationrecord record);

    int insertSelective(Forumgroupinvitationrecord record);

    Forumgroupinvitationrecord selectByPrimaryKey(String groupInvitationRecordId);

    int updateByPrimaryKeySelective(Forumgroupinvitationrecord record);

    int updateByPrimaryKey(Forumgroupinvitationrecord record);
    
    List<Forumgroupinvitationrecord> getInvitations(String userId);
    
    int updateByPrimaryKeyForInviteStatus(@Param("groupInvitationRecordId")String groupInvitationRecordId,@Param("inviteStatus")Integer inviteStatus);
    
    Forumgroupinvitationrecord selectByGroupIdUserIdAndInvitedUserId(@Param("userId")String userId, @Param("invitedUserId")String invitedUserId, @Param("forumGroupId")String forumGroupId);
    
    Forumgroupinvitationrecord selectByGroupIdAndUserId(@Param("invitedUserId")String invitedUserId,@Param("forumGroupId")String forumGroupId);
    
}